@use '@/style/variables.scss' as vars;

/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: vars.$font-family;
  background: vars.$bg-primary;
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: vars.$text-primary;
  line-height: 1.6;
  min-height: 100vh;
}

@keyframes gradientBG {
  0% {
    background-position: 0 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

/* 应用头部 */
.app-header {
  text-align: center;
  padding: vars.$spacing-2xl 0 vars.$spacing-lg;
}

.app-title {
  font-size: vars.$font-size-2xl;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, #ffffff, #a0d2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 导航栏美化 */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: vars.$spacing-lg 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid vars.$border-glass;
  box-shadow: vars.$shadow-md;
  margin-bottom: vars.$spacing-lg;
}

.nav-menu {
  display: flex;
  list-style: none;
  background: vars.$bg-glass;
  border-radius: vars.$radius-full;
  padding: vars.$spacing-sm;
}

.nav-item {
  margin: 0 vars.$spacing-sm;
}

.nav-link {
  text-decoration: none;
  color: vars.$text-secondary;
  padding: vars.$spacing-sm vars.$spacing-md;
  border-radius: vars.$radius-full;
  transition: all vars.$transition-normal;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  background: vars.$bg-glass;
  display: block;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
  }

  &:hover::before {
    left: 100%;
  }

  &:hover {
    background-color: vars.$bg-glass-hover;
    color: vars.$text-primary;
    transform: translateY(-2px);
    box-shadow: vars.$shadow-sm;
  }

  &.active {
    background-color: vars.$bg-glass-active;
    color: vars.$text-primary;
    box-shadow: vars.$shadow-sm;
  }
}

.main-content {
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* 加载和错误状态 */
.loading,
.error {
  text-align: center;
  padding: 60px 30px;
  font-size: vars.$font-size-lg;
  border-radius: vars.$radius-xl;
  margin: vars.$spacing-lg 0;
}

.loading {
  color: vars.$primary-color;
}

.error {
  color: vars.$danger-color;
}
